package 接口回调;

public class test {
    public static void main(String[]args){
        MyMath mm=new MyMath(3,5);
        mm.sum(new MyRun() {
            @Override
            public void show(int s) {
                System.out.println("和为："+s);

            }
        });
        MyMath mm2=new MyMath(10,12);
        mm2.sum(new MyRun() {
            @Override
            public void show(int s) {
                System.out.println("sum is:"+s);

            }
        });
    }
}
